<!DOCTYPE html>
<html>
  <head>
    <%- include('head') %>
    <link rel='stylesheet' href='/stylesheets/class.css' />
  </head>
  <body>
    <div id="back">

    </div>
    <section class="section">
      <p id="status"><%= status %></p>
      <div class="container">
        <h1 class="title">
          班级签到
        </h1>
        <div id="students">
          <table class="table is-striped is-fullwidth">
            <thead>
              <tr>
                <th>学号</th>
                <th>姓名</th>
                <th>人员状态</th>
              </tr>
            </thead>
            <tbody>
              <% var posobj = {'在校':'school','外出实习':'out-intern','回家':'home','旅游':'tour'}%>
              <% if(students){ %>
                <%for (var i=0;i<students.length;i++){%>
                  <% var student = students[i] %>
                  <tr>
                    <td class="id"><%= student.id %></td>
                    <td class="name"><%= student.name %></td>
                    <td>
                      <div class="field">
                        <div class="control">
                          <div class="select">
                            <select class="position" data-value="<%= posobj[student['status']] %>">
                              <option value="<%= posobj['在校']%>">在校</option>
                              <option value="<%= posobj['外出实习']%>">外出实习</option>
                              <option value="<%= posobj['回家']%>">回家</option>
                              <option value="<%= posobj['旅游']%>">旅游</option>
                            </select>
                          </div>
                        </div>
                      </div>
                    </td>
                  </tr>
                <%}%>
              <% } %>
              
            </tbody>
          </table>
          <button id="submit" class="button is-primary">submit</button>
        </div>
      </div>
      
    </section>
  </body>
  <script type="text/javascript" src="/javascripts/classSignin.js">
    
  </script>
</html>